package org.dkakunsi.aplikasitoko.main;

import javax.swing.UIManager;

import org.dkakunsi.aplikasitoko.form.Splash;

public class Main {
	/**
	 * Launch the application.
	 */
//	@SuppressWarnings("deprecation")
	public static void main(String[] args) {
		UISetter();
		new Splash();
	}

	private static void UISetter() {
		UIManager.LookAndFeelInfo plafinfo[] = UIManager.getInstalledLookAndFeels();
		boolean nimbusFound = false;
		int nimbusIndex = 0;
		
		for( int i = 0; i < plafinfo.length; i++ ) {
			if( plafinfo[i].getClassName().toLowerCase().contains("nimbus")) {
				nimbusFound = true;
				nimbusIndex = i;
			}
		}
		
		try {
			if( nimbusFound ) {
				UIManager.setLookAndFeel(plafinfo[nimbusIndex].getClassName());
			} else {
				UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
			}
		} catch(Exception e) { }
	}

}
